#pragma once

#include "e2d/core/Entity.h"
#include "e2d/core/EntityHandler.h"
#include "e2d/core/render/URPRenderer.h"

namespace e2d
{
	struct SpriteRenderer :public e2d::EntityHandler
	{
		std::shared_ptr<e2d::FontEffect> m_FontEffect;

		std::shared_ptr<e2d::PickupEffect> m_PickupEffect;

		std::shared_ptr<e2d::ImageEffect> m_ImageEffect;
		
		std::shared_ptr<e2d::GBufferEffect> m_GBufferEffect;

		std::shared_ptr<e2d::SkyboxEffect> m_hdrSkyboxDebugEffect;

		std::shared_ptr<e2d::URPRenderer> m_URPRenderer;

		glm::ivec2 m_ScreenSize{ 800,600 };

		void SetScreenSize(const glm::ivec2& screenSize);

		SpriteRenderer();

		void SetInst(std::shared_ptr<e2d::Scene> scene);

		void OnLoad();

		void OnRender();

		void OnUpdate();
		
		void OnUpdateRuntime();

		void OnRenderRuntime();

		void RenderPass();

		void RenderPassGBuffer();

		void RenderPassTexts();

		void RenderPickupPass(e2d::Entity* cameraObj);

		void InitLight();

		void RenderSkybox();
	};

};